Changeset 7741:83ddc19a3068 in orange


Ignore:
Timestamp:
03/15/11 14:31:14 (3 years ago)
Author:
markotoplak
Branch:
default
Convert:
e08038084e694ede24509c9d9d3e526b69a1caf8
Message:

Removed dependency on orngServerFiles.createPath

File:
1 edited

Legend:

Unmodified
Added
Removed
  • install-scripts/orngServer/serverUpdateScripts/updateGEO.py

    r7116 r7741  
    1212from datetime import datetime 
    1313import obiGEO 
     14import os 
    1415 
    1516DOMAIN = "GEO" 
     
    3435localfile = orngServerFiles.localpath(DOMAIN, GDS_INFO) 
    3536 
     37def _create_path_for_file(target): #KEGG uses this! 
     38    try: 
     39        os.makedirs(os.path.dirname(target)) 
     40    except OSError: 
     41        pass 
     42 
    3643path = orngServerFiles.localpath(DOMAIN) 
    3744if GDS_INFO in server.listfiles(DOMAIN): 
     
    4350else: 
    4451    print "Creating a local path..." 
    45     orngServerFiles.createPathForFile(localfile) 
     52    _create_path_for_file(localfile) 
    4653    f = file(localfile, "wb") 
    4754    cPickle.dump(({}, {}), f, True) 
Note: See TracChangeset for help on using the changeset viewer.