diff options
| author | Robert Tari <robert@tari.in> | 2024-05-15 14:34:47 +0200 |
|---|---|---|
| committer | Robert Tari <robert@tari.in> | 2024-05-15 14:34:47 +0200 |
| commit | 26278e2a6476dcd0de402505554387240c45922c (patch) | |
| tree | 3919035d5a178fe3e67b3a739b5a0def6d8a0e91 /setup.py | |
| parent | 8c9af1106358c9463bf7655d5a1d1122e6eb2a4c (diff) | |
| parent | 315cf2cd8bf5dbf156aa5610fe4c64a07d04abce (diff) | |
| download | ayatana-webmail-26278e2a6476dcd0de402505554387240c45922c.tar.gz ayatana-webmail-26278e2a6476dcd0de402505554387240c45922c.tar.bz2 ayatana-webmail-26278e2a6476dcd0de402505554387240c45922c.zip | |
Merge branch 'sunweaver-pr/desktop-in-plus-translation-fixes'
Attributes GH PR #37: https://github.com/AyatanaIndicators/ayatana-webmail/pull/37
Diffstat (limited to 'setup.py')
| -rwxr-xr-x | setup.py | 15 |
1 files changed, 9 insertions, 6 deletions
@@ -7,10 +7,11 @@ from ayatanawebmail.appdata import * for sFile in ['data/etc/xdg/autostart/ayatana-webmail-autostart.desktop', 'data/usr/share/applications/ayatana-webmail.desktop']: - oFile = open(sFile, 'r+') + oInFile = open("{desktop_file}.in".format(desktop_file=sFile), 'r') oConfigParser = configparser.ConfigParser() oConfigParser.optionxform = str - oConfigParser.read_file(oFile) + oConfigParser.read_file(oInFile) + oInFile.close() for strRoot, lstDirnames, lstFilenames in os.walk('po'): @@ -40,10 +41,10 @@ for sFile in ['data/etc/xdg/autostart/ayatana-webmail-autostart.desktop', 'data/ oConfigParser[sSection] = dict(sorted(oConfigParser[sSection].items(), key=lambda lParams: lParams[0])) - oFile.seek(0) - oConfigParser.write(oFile, False) - oFile.truncate() - oFile.close() + oOutFile = open("{desktop_file}".format(desktop_file=sFile), 'w') + oConfigParser.write(oOutFile, False) + oOutFile.truncate() + oOutFile.close() m_lstDataFiles = [] @@ -69,6 +70,8 @@ for strRoot, lstDirnames, lstFilenames in os.walk('data'): for strFilename in lstFilenames: + if strFilename.endswith(".in"): + continue strPath = os.path.join(strRoot, strFilename) m_lstDataFiles.append((os.path.dirname(strPath).lstrip('data'), [strPath])) |
