equal
deleted
inserted
replaced
29 import raptor_utilities |
29 import raptor_utilities |
30 import raptor_xml |
30 import raptor_xml |
31 import generic_path |
31 import generic_path |
32 import subprocess |
32 import subprocess |
33 import zipfile |
33 import zipfile |
|
34 from xml.sax.saxutils import escape |
34 from mmpparser import * |
35 from mmpparser import * |
35 |
36 |
36 import time |
37 import time |
37 |
38 |
38 |
39 |
2899 files.sort() |
2900 files.sort() |
2900 |
2901 |
2901 for file in files: |
2902 for file in files: |
2902 if not file.endswith('/'): |
2903 if not file.endswith('/'): |
2903 expfilename = str(generic_path.Join(destination, file)) |
2904 expfilename = str(generic_path.Join(destination, file)) |
2904 exportwhatlog += "<member>" + expfilename + "</member>\n" |
2905 exportwhatlog += "<member>" + escape(expfilename) + "</member>\n" |
2905 |
2906 |
2906 self.__Raptor.PrintXML("<clean bldinf='" + bldinf_filename + "' mmp='' config=''>\n") |
2907 self.__Raptor.PrintXML("<clean bldinf='" + bldinf_filename + "' mmp='' config=''>\n") |
2907 self.__Raptor.PrintXML("<zipmarker>" + markerfilename + "</zipmarker>\n") |
2908 self.__Raptor.PrintXML("<zipmarker>" + markerfilename + "</zipmarker>\n") |
2908 self.__Raptor.PrintXML("</clean>\n") |
2909 self.__Raptor.PrintXML("</clean>\n") |
2909 |
2910 |
2944 int(datetime[4]), int(datetime[5]), int(0), int(0), int(0)) |
2945 int(datetime[4]), int(datetime[5]), int(0), int(0), int(0)) |
2945 modifiedtime = time.mktime(timeTuple) |
2946 modifiedtime = time.mktime(timeTuple) |
2946 os.utime(expfilename,(accesstime, modifiedtime)) |
2947 os.utime(expfilename,(accesstime, modifiedtime)) |
2947 |
2948 |
2948 filecount += 1 |
2949 filecount += 1 |
2949 exportwhatlog+="<member>" + expfilename + "</member>\n" |
2950 exportwhatlog+="<member>" + escape(expfilename) + "</member>\n" |
2950 except IOError, e: |
2951 except IOError, e: |
2951 message = "Could not unzip %s to %s: file %s: %s" %(source, destination, expfilename, str(e)) |
2952 message = "Could not unzip %s to %s: file %s: %s" %(source, destination, expfilename, str(e)) |
2952 if not self.__Raptor.keepGoing: |
2953 if not self.__Raptor.keepGoing: |
2953 raise MetaDataError(message) |
2954 raise MetaDataError(message) |
2954 else: |
2955 else: |