diff options
author | Tony Anderson <tony@traveler.(none)> | 2011-03-04 09:07:01 (GMT) |
---|---|---|
committer | Tony Anderson <tony@traveler.(none)> | 2011-03-04 09:07:01 (GMT) |
commit | df2c43b6afa46bf72ccb590556ad5fde7c38a0d6 (patch) | |
tree | 62247ccc2fad834a86b0a98471ea53ec4bfd2a37 | |
parent | 2a7e0041c16ba4479db62011a7908be6102e8b19 (diff) |
version 12.4
-rwxr-xr-x | activity/activity.info | 2 | ||||
-rwxr-xr-x | cgi-bin/activities.py | 4 | ||||
-rwxr-xr-x | cgi-bin/setUpSubject.py | 13 |
3 files changed, 12 insertions, 7 deletions
diff --git a/activity/activity.info b/activity/activity.info index 9982f62..94346d1 100755 --- a/activity/activity.info +++ b/activity/activity.info @@ -1,5 +1,5 @@ [Activity] -#version = 12.3 +#version = 12.4 name = Learn service_name = rw.olpc.Learn icon = activity-learn diff --git a/cgi-bin/activities.py b/cgi-bin/activities.py index c0fc829..8a36e79 100755 --- a/cgi-bin/activities.py +++ b/cgi-bin/activities.py @@ -183,6 +183,8 @@ def getFile(filepth,filename): log = open('/tmp/loggetfile','w') pth = filepth / filename tgtpth = path('content') / filepth + print >> log, 'filepth',filepth,'tgtpth',tgtpth,'filename',filename + log.close() if USB.exists(): #get from usb drive pth = USB / srcpth cmd = 'cp -r ' + pth + ' ' + tgtpth @@ -190,6 +192,8 @@ def getFile(filepth,filename): subprocess.call(cmd,shell=True) else: #get from schoolserver pth = SS / filepth + log = open('/tmp/loggetfile1','w') + print >> log, 'pth',pth if filename.find('*') > -1: script = 'cd ' + str(pth) + '\nmget ' + filename else: diff --git a/cgi-bin/setUpSubject.py b/cgi-bin/setUpSubject.py index dc67905..adf0ff4 100755 --- a/cgi-bin/setUpSubject.py +++ b/cgi-bin/setUpSubject.py @@ -21,15 +21,16 @@ for line in lines: print >> log, line, len(entry) print >> log, entry[0],entry[1],entry[2] subject = entry[1] + srcpth = path(subject) tgtpth = basepth / subject - srcpth = subject - print >> log, 'tgtpth', tgtpth + log.close() + log = open('/tmp/logsetup1','w') if not tgtpth.exists(): subprocess.call('mkdir ' + tgtpth,shell=True) result = getFile(srcpth, '*.js') - result = getFile(srcpth, tgtpth, '*.html') - result = getFile(srcpth, tgtpth, '*.png') - result = getFile(srcpth, tgtpth,'*.gif') - print >> log, 'loaded',tgtpth + result = getFile(srcpth, '*.html') + result = getFile(srcpth, '*.png') + result = getFile(srcpth, '*.gif') + print >> log, 'loaded',srcpth print >> log, 'done' log.close() |