actionsapi += dorename..

bir de repostat'a ufak bir ek..
This commit is contained in:
A. Murat Eren
2005-09-28 14:08:09 +00:00
parent 30d8dff364
commit 28e1fc0ec8
2 changed files with 13 additions and 0 deletions
+11
View File
@@ -151,6 +151,17 @@ def domove(sourceFile, destination, destinationFile = ''):
else:
move(file, get.installDIR() + os.path.join(destination, destinationFile))
def dorename(sourceFile, destinationFile):
''' renames sourceFile as destinationFile'''
''' example call: pisitools.dorename("/usr/bin/bash", "bash.old") '''
''' the result of the previous example would be "/usr/bin/bash.old" '''
try:
os.rename(get.installDIR() + sourceFile, get.installDIR() + destinationFile)
except OSError:
ctx.ui.error('\n!!! ActionsAPI [dorename]: No such file or directory: "%s"...' % sourceFile)
def dopython():
'''FIXME: What the hell is this?'''
pass
+2
View File
@@ -135,6 +135,8 @@ for pak in paks:
for lice in lices:
licenses.add(lice)
host = pisi.uri.URI(spec.source.archiveUri).location()
if host == "":
print pisi.uri.URI(spec.source.archiveUri)
hosts.add(host)
print "<html><head><title>%s İstatistikleri</title>" % (sys.argv[1])