Ignore:
Timestamp:
08/24/06 11:00:40 (18 years ago)
Author:
mar637
Message:

allowing for ASAPDATA env variable. more printing.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/bin/asap_update_data

    r1179 r1180  
    1212tmpmd5 = tmpdata+'.md5sum'
    1313
    14 
     14print "Checking if an update is required."
    1515md5req = urllib2.Request(dataurl+name+'.md5sum')
    1616response = urllib2.urlopen(md5req)
     
    2323# get asap module path
    2424asapbase = asap.__path__[0]
    25 
     25# use ASAPDATA if set - allows non-root update
     26if os.environ.has_key("ASAPDATA"):
     27    asapbase = os.environ["ASAPDATA"]
     28   
    2629try:
    2730    fl = os.path.join(asapbase, name+".md5sum")
     
    3639    dreq = urllib2.Request(dataurl+name)
    3740    src = urllib2.urlopen(dreq)
    38     print "Downloading asap data archive...."
     41    print "Update required. Downloading asap data archive...."
    3942    dst = open(tmpdata, 'w')
    4043    dst.write(src.read())
Note: See TracChangeset for help on using the changeset viewer.