Make pre-commit hook pass after python3 switch

This commit is contained in:
Daniel Martí 2016-01-04 17:28:55 +01:00
parent 49ac25270e
commit ee9a296b64
7 changed files with 18 additions and 17 deletions

View file

@ -102,8 +102,8 @@ def main():
default_sdk_path = '/opt/android-sdk'
while not options.no_prompt:
try:
s = raw_input('Enter the path to the Android SDK ('
+ default_sdk_path + ') here:\n> ')
s = input('Enter the path to the Android SDK ('
+ default_sdk_path + ') here:\n> ')
except KeyboardInterrupt:
print('')
sys.exit(1)

View file

@ -295,12 +295,12 @@ def main():
sftp = ssh.open_sftp()
if os.path.basename(remotepath) \
not in sftp.listdir(os.path.dirname(remotepath)):
sftp.mkdir(remotepath, mode=0755)
sftp.mkdir(remotepath, mode=0o755)
for repo_section in repo_sections:
repo_path = os.path.join(remotepath, repo_section)
if os.path.basename(repo_path) \
not in sftp.listdir(remotepath):
sftp.mkdir(repo_path, mode=0755)
sftp.mkdir(repo_path, mode=0o755)
sftp.close()
ssh.close()
elif options.command == 'update':

View file

@ -1337,14 +1337,15 @@ def main():
# Generate latest apps data for widget
if os.path.exists(os.path.join('stats', 'latestapps.txt')):
data = ''
for line in file(os.path.join('stats', 'latestapps.txt')):
appid = line.rstrip()
data += appid + "\t"
app = apps[appid]
data += app.Name + "\t"
if app.icon is not None:
data += app.icon + "\t"
data += app.License + "\n"
with open(os.path.join('stats', 'latestapps.txt'), 'r') as f:
for line in f:
appid = line.rstrip()
data += appid + "\t"
app = apps[appid]
data += app.Name + "\t"
if app.icon is not None:
data += app.icon + "\t"
data += app.License + "\n"
with open(os.path.join(repodirs[0], 'latestapps.dat'), 'w') as f:
f.write(data)