change print for python3
This commit is contained in:
parent
a6205344b1
commit
daadb52b9c
3 changed files with 11 additions and 7 deletions
4
TODO.rst
4
TODO.rst
|
@ -40,9 +40,9 @@
|
||||||
|
|
||||||
- can't trust "~"::
|
- can't trust "~"::
|
||||||
|
|
||||||
[0 tv@musti ~]$ sudo python -c 'import os; print os.path.expanduser("~")'
|
[0 tv@musti ~]$ sudo python -c 'import os; print(os.path.expanduser("~"))'
|
||||||
/home/tv
|
/home/tv
|
||||||
[0 tv@musti ~]$ sudo -H python -c 'import os; print os.path.expanduser("~")'
|
[0 tv@musti ~]$ sudo -H python -c 'import os; print(os.path.expanduser("~"))'
|
||||||
/root
|
/root
|
||||||
|
|
||||||
- command line options
|
- command line options
|
||||||
|
|
|
@ -91,8 +91,9 @@ def generate_project_list_fp(config, fp):
|
||||||
else:
|
else:
|
||||||
response.append(owner)
|
response.append(owner)
|
||||||
|
|
||||||
line = ' '.join([urllib.quote_plus(s) for s in response])
|
line = ' '.join([urllib.parse.quote_plus(s) for s in response])
|
||||||
print >>fp, line
|
#print >>fp, line
|
||||||
|
print(line, end="", file=fp)
|
||||||
|
|
||||||
def generate_project_list(config, path):
|
def generate_project_list(config, path):
|
||||||
"""
|
"""
|
||||||
|
@ -159,7 +160,8 @@ def set_descriptions(config):
|
||||||
tmp = '%s.%d.tmp' % (path, os.getpid())
|
tmp = '%s.%d.tmp' % (path, os.getpid())
|
||||||
f = open(tmp, 'w')
|
f = open(tmp, 'w')
|
||||||
try:
|
try:
|
||||||
print >>f, description
|
#print >>f, description
|
||||||
|
print(description, end="", file=f)
|
||||||
finally:
|
finally:
|
||||||
f.close()
|
f.close()
|
||||||
os.rename(tmp, path)
|
os.rename(tmp, path)
|
||||||
|
|
|
@ -76,11 +76,13 @@ def writeAuthorizedKeys(path, keydir):
|
||||||
try:
|
try:
|
||||||
if in_ is not None:
|
if in_ is not None:
|
||||||
for line in filterAuthorizedKeys(in_):
|
for line in filterAuthorizedKeys(in_):
|
||||||
print >>out, line
|
#print >>out, line
|
||||||
|
print(line, end="", file=out)
|
||||||
|
|
||||||
keygen = readKeys(keydir)
|
keygen = readKeys(keydir)
|
||||||
for line in generateAuthorizedKeys(keygen):
|
for line in generateAuthorizedKeys(keygen):
|
||||||
print >>out, line
|
#print >>out, line
|
||||||
|
print(line, end="", file=out)
|
||||||
|
|
||||||
os.fsync(out)
|
os.fsync(out)
|
||||||
finally:
|
finally:
|
||||||
|
|
Loading…
Reference in a new issue