Commits

Wang Dingwei committed cc505b7

fixed bad class reference

  • Participants
  • Parent commits a88f409

Comments (0)

Files changed (2)

File orderfilter/helpers.py

 from fnmatch import fnmatch
+import os
 
 class InvalidOrder:
     """An adapter class or invalid XML files, used in fail_process()"""

File orderfilter/orderfilter.py

 from helpers import InvalidOrder, MatchObj
 from logger import logger
 
+
 def main(cfg):
     logger.info("Order filter (version %s) started." % VERSION)
     
             try:
                 order = SDR(orderpath)
             except SDRError, e:
-                fail_process(cfg, Invalid(orderpath), MatchObj('invalid'))
+                fail_process(cfg, 
+                        InvalidOrder(orderpath), 
+                        MatchObj('invalid'))
                 continue
 
             match = None
                 try:
                     match = rule.match(order)
                 except SDRError, e:
-                    fail_process(cfg, Invalid(orderpath), MatchObj('invalid'))
+                    fail_process(cfg, 
+                            InvalidOrder(orderpath), 
+                            MatchObj('invalid'))
                     break
 
                 if match: