try:
f = open('%s/.config/cdist' % os.path.expanduser('~'), 'r')
- while 1:
+ while True:
l = f.readline()
if l == '':
break
def copytree(a, b):
log('copy %s -> %s' % (a, b))
- shutil.copytree(a, b)
+ os.command('scp -r %s %s' % (a, b))
def copyfile(a, b):
log('copy %s -> %s' % (a, b))
- shutil.copyfile(a, b)
+ os.command('scp %s %s' % (a, b))
def rmdir(a):
log('remove %s' % a)
def read_wscript_variable(directory, variable):
f = open('%s/wscript' % directory, 'r')
- while 1:
+ while True:
l = f.readline()
if l == '':
break
def set_version_in_wscript(version):
f = open('wscript', 'rw')
o = open('wscript.tmp', 'w')
- while 1:
+ while True:
l = f.readline()
if l == '':
break
project.checkout(target)
text = open('ChangeLog', 'r')
- html = open('%s/changelog.html' % args.output, 'w')
+ html = tempfile.NamedTemporaryFile()
versions = 8
last = None
changes = []
- while 1:
+ while True:
l = text.readline()
if l == '':
break
else:
changes[-1] += " " + c
+ copyfile(html.file, '%s/changelog.html' % args.output)
+ html.close()
target.cleanup()
elif globals.command == 'manual':