Exemplo n.º 1
0
 def clean(self):
     cwd = os.getcwd()
     os.chdir(self.holding_dir)
     for f in self.in_holding.keys():
         # TODO: Sanitize path in a much better manner...
         if os.path.exists(f):
             if f.find('/') != -1:
                 fubar("WTF? clean_holding() got a file ('%s') with / in it!" % (f))
             else:
                 os.unlink(f)
     self.in_holding = {}
     os.chdir(cwd)
Exemplo n.º 2
0
 def clean(self):
     cwd = os.getcwd()
     os.chdir(self.holding_dir)
     for f in self.in_holding.keys():
         # TODO: Sanitize path in a much better manner...
         if os.path.exists(f):
             if f.find('/') != -1:
                 fubar(
                     "WTF? clean_holding() got a file ('%s') with / in it!"
                     % (f))
             else:
                 os.unlink(f)
     self.in_holding = {}
     os.chdir(cwd)