Changeset 7347:3ee946f4258f in orange


Ignore:
Timestamp:
02/03/11 22:46:46 (3 years ago)
Author:
ales_erjavec <ales.erjavec@…>
Branch:
default
Convert:
292e5aa30acb90dce9a5f7e9ff434c78638c339d
Message:
  • suppress a possible expression on backup
File:
1 edited

Legend:

Unmodified
Added
Removed
  • orange/orange2to25.py

    r7344 r7347  
    1818            filename = getattr(self, "outputfilename", filename) 
    1919             
     20            if hasattr(self, "outputfilename"): 
     21                self.nobackups = True 
    2022            backup = filename + ".bak" 
    2123            if os.path.lexists(backup): 
     
    3335        write(new_text, filename, old_text, encoding) 
    3436        if not self.nobackups: 
    35             shutil.copymode(backup, filename) 
     37            try: 
     38                shutil.copymode(backup, filename) 
     39            except OSError, ex: 
     40                pass 
    3641             
    3742def main(fixer_pkg, args=None): 
     
    126131    if options.outfile: 
    127132        if len(args) > 2: 
    128             print args 
    129133            print >> sys.stderr, "-o, --outfile used but multiple script arguments" 
    130134        elif not os.path.isfile(args[-1]): 
Note: See TracChangeset for help on using the changeset viewer.