Commits

Anonymous committed 625023c

Debugging DATECODE syntax errors

  • Participants
  • Parent commits e7a3bc8

Comments (0)

Files changed (1)

modules/support/vectorlinux/DATESET.py

 
 class HWClock(object):
     """ Interact with the hwclock """
-    def __init__(self, descriptor = "/etc/hardwareclock")
+    def __init__(self, descriptor = "/etc/hardwareclock"):
         self.descriptor = descriptor
 
     def _line_sets_value(self, line):
         """ Returns True if line is "localtime" or "UTC" """
-        return line.startswitn("localtime") or line.startswitn("UTC")
+        return line.startswith("localtime") or line.startswith("UTC")
 
     def get_value(self):
         """ Read self.descriptor and return the current setting """
         with open(self.descriptor) as f:
             for line in f:
-                if _line_sets_value(line):
+                if self._line_sets_value(line):
                     return line.strip()
 
     def set_value(self, value):
         newdata = []
         with open(self.descriptor) as f:
             for line in f:
-                if _lit_sets_value(line):
+                if self._line_sets_value(line):
                     line = "%s\n"% value
                 newdata.append(line)
 
         # This will except
         return os.symlink(src, dest)
 
-    
-    
 
 class DateTime:
     """Manage the system date and time.