mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2025-02-25 18:55:31 -06:00
Apply codestyle checks to all Python code.
This commit is contained in:
@@ -90,13 +90,14 @@ data 'STR#' (5002, "English") {
|
||||
$"2C20 7072 6573 7320 2244 6973 6167 7265"
|
||||
$"6522 2E"
|
||||
};\n\n""")
|
||||
with open(license, 'r') as l:
|
||||
with open(license, 'r') as lines:
|
||||
kind = 'RTF ' if license.lower().endswith('.rtf') else 'TEXT'
|
||||
f.write('data \'%s\' (5000, "English") {\n' % kind)
|
||||
|
||||
def escape(s):
|
||||
return s.strip().replace('\\', '\\\\').replace('"', '\\"')
|
||||
|
||||
for line in l:
|
||||
for line in lines:
|
||||
if len(line) < 1000:
|
||||
f.write(' "' + escape(line) + '\\n"\n')
|
||||
else:
|
||||
@@ -128,6 +129,7 @@ data 'STR#' (5002, "English") {
|
||||
else:
|
||||
print("Failed to add license to '%s'" % dmgFile)
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
parser = optparse.OptionParser()
|
||||
parser.set_usage("""%prog <dmgFile> <licenseFile> [OPTIONS]
|
||||
|
||||
Reference in New Issue
Block a user