Skip to content

Commit

Permalink
Merge pull request #3608 from BOINC/dpa_python
Browse files Browse the repository at this point in the history
Make the upgrade and make_project scripts work again.
  • Loading branch information
davidpanderson committed Apr 26, 2020
2 parents ca709c6 + b881ab8 commit 0900f7e
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 14 deletions.
18 changes: 6 additions & 12 deletions py/Boinc/tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,21 +62,15 @@ def file_size(path):
f.seek(0,2)
return f.tell()

def query_yesno(question):
def query_yesno(str):
'''Query user; default Yes'''
valid = ('yes', 'y', '')
choice = input(question + "[Y/n] ").lower()
if choice in valid:
return True
return False
print str, "[Y/n] ",
return not raw_input().strip().lower().startswith('n')

def query_noyes(question):
def query_noyes(str):
'''Query user; default No'''
valid = ('yes', 'y')
choice = input(question + "[y/N] ").lower()
if choice in valid:
return True
return False
print str, "[y/N] ",
return raw_input().strip().lower().startswith('y')

def get_output_file_path(filename):
""" Return the filename's path in the upload directory
Expand Down
2 changes: 1 addition & 1 deletion tools/make_project
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python3
#!/usr/bin/env python

# $Id$
# Creates a new BOINC project.
Expand Down
2 changes: 1 addition & 1 deletion tools/upgrade
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python3
#!/usr/bin/env python

# $Id$

Expand Down

0 comments on commit 0900f7e

Please sign in to comment.