Fix various typos, add .gitignore file
authorVangelis Koukis <vkoukis@grnet.gr>
Sat, 1 Sep 2012 15:29:47 +0000 (18:29 +0300)
committerVangelis Koukis <vkoukis@grnet.gr>
Sat, 1 Sep 2012 15:29:47 +0000 (18:29 +0300)
Fix various typos in messages, add .gitignore file for
automatically produced intermediate files.

.gitignore [new file with mode: 0644]
image_creator/dialog_main.py
image_creator/dialog_wizard.py
image_creator/main.py
image_creator/os_type/__init__.py
image_creator/os_type/linux.py

diff --git a/.gitignore b/.gitignore
new file mode 100644 (file)
index 0000000..a204982
--- /dev/null
@@ -0,0 +1,4 @@
+*.pyc
+build/
+dist/
+*.egg-info
index 85e8a0b..2079269 100644 (file)
@@ -360,12 +360,12 @@ def register_image(session):
         for key in session['task_metadata']:
             metadata[key] = 'yes'
 
-    gauge = GaugeOutput(d, "Image Registration", "Registrating image...")
+    gauge = GaugeOutput(d, "Image Registration", "Registering image...")
     try:
         out = dev.out
         out.add(gauge)
         try:
-            out.output("Registring image to cyclades...")
+            out.output("Registering image with Cyclades...")
             try:
                 kamaki = Kamaki(session['account'], session['token'], out)
                 kamaki.register(name, session['pithos_uri'], metadata)
@@ -378,7 +378,7 @@ def register_image(session):
     finally:
         gauge.cleanup()
 
-    d.msgbox("Image `%s' was successfully registered to cyclades as `%s'" %
+    d.msgbox("Image `%s' was successfully registered with Cyclades as `%s'" %
              (session['upload'], name), width=MSGBOX_WIDTH)
     return True
 
@@ -660,9 +660,9 @@ def sysprep(session):
             index += 1
 
         (code, tags) = d.checklist(
-            "Please choose which system preperation tasks you would like to "
+            "Please choose which system preparation tasks you would like to "
             "run on the image. Press <Help> to see details about the system "
-            "preperation tasks.", title="Run system preperation tasks",
+            "preparation tasks.", title="Run system preparation tasks",
             choices=choices, width=70, ok_label="Run", help_button=1)
 
         if code in (d.DIALOG_CANCEL, d.DIALOG_ESC):
@@ -746,7 +746,7 @@ def shrink(session):
 def customization_menu(session):
     d = session['dialog']
 
-    choices = [("Sysprep", "Run various image preperation tasks"),
+    choices = [("Sysprep", "Run various image preparation tasks"),
                ("Shrink", "Shrink image"),
                ("View/Modify", "View/Modify image properties"),
                ("Delete", "Delete image properties"),
index f61197d..4e2247d 100644 (file)
@@ -268,7 +268,7 @@ def extract_image(session):
             out.success('done')
             out.output()
 
-            out.output('Registring image to ~okeanos...', False)
+            out.output('Registering image with ~okeanos...', False)
             kamaki.register(wizard['ImageName'], pithos_file, metadata)
             out.success('done')
             out.output()
@@ -278,7 +278,7 @@ def extract_image(session):
     finally:
         out.remove(with_progress)
 
-    msg = "The image was successfully uploaded and registered to " \
+    msg = "The image was successfully uploaded and registered with " \
           "~okeanos. Would you like to keep a local copy of the image?"
     if not d.yesno(msg, width=PAGE_WIDTH):
         getattr(__import__("image_creator.dialog_main",
index 85c9272..a12d863 100644 (file)
@@ -88,12 +88,12 @@ def parse_options(input_args):
 
     parser.add_option("-r", "--register", dest="register", type="string",
                       default=False,
-                      help="register the image to ~okeanos as IMAGENAME",
+                      help="register the image with ~okeanos as IMAGENAME",
                       metavar="IMAGENAME")
 
     parser.add_option("-a", "--account", dest="account", type="string",
                       default=account, help="Use this ACCOUNT when "
-                      "uploading/registring images [Default: %s]" % account)
+                      "uploading/registering images [Default: %s]" % account)
 
     parser.add_option("-m", "--metadata", dest="metadata", default=[],
                       help="Add custom KEY=VALUE metadata to the image",
@@ -101,7 +101,7 @@ def parse_options(input_args):
 
     parser.add_option("-t", "--token", dest="token", type="string",
                       default=token, help="Use this token when "
-                      "uploading/registring images [Default: %s]" % token)
+                      "uploading/registering images [Default: %s]" % token)
 
     parser.add_option("--print-sysprep", dest="print_sysprep", default=False,
                       help="print the enabled and disabled system preparation "
@@ -117,7 +117,7 @@ def parse_options(input_args):
                       metavar="SYSPREP")
 
     parser.add_option("--no-sysprep", dest="sysprep", default=True,
-                      help="don't perform system preperation",
+                      help="don't perform system preparation",
                       action="store_false")
 
     parser.add_option("--no-shrink", dest="shrink", default=True,
@@ -277,7 +277,7 @@ def image_creator():
                 out.output()
 
             if options.register:
-                out.output('Registring image to ~okeanos...', False)
+                out.output('Registering image with ~okeanos...', False)
                 kamaki.register(options.register, uploaded_obj, metadata)
                 out.success('done')
                 out.output()
index 5bb8226..c0fa505 100644 (file)
@@ -115,15 +115,15 @@ class OSBase(object):
         return method
 
     def enable_sysprep(self, obj):
-        """Enable a system preperation operation"""
+        """Enable a system preparation operation"""
         setattr(obj.im_func, 'enabled', True)
 
     def disable_sysprep(self, obj):
-        """Disable a system preperation operation"""
+        """Disable a system preparation operation"""
         setattr(obj.im_func, 'enabled', False)
 
     def print_syspreps(self):
-        """Print enabled and disabled system preperation operations."""
+        """Print enabled and disabled system preparation operations."""
 
         syspreps = self.list_syspreps()
         enabled = filter(lambda x: x.enabled, syspreps)
@@ -134,7 +134,7 @@ class OSBase(object):
         wrapper.initial_indent = '\t'
         wrapper.width = 72
 
-        self.out.output("Enabled system preperation operations:")
+        self.out.output("Enabled system preparation operations:")
         if len(enabled) == 0:
             self.out.output("(none)")
         else:
@@ -143,7 +143,7 @@ class OSBase(object):
                 descr = wrapper.fill(textwrap.dedent(sysprep.__doc__))
                 self.out.output('    %s:\n%s\n' % (name, descr))
 
-        self.out.output("Disabled system preperation operations:")
+        self.out.output("Disabled system preparation operations:")
         if len(disabled) == 0:
             self.out.output("(none)")
         else:
index fd45152..0166129 100644 (file)
@@ -156,12 +156,12 @@ class Linux(Unix):
     @sysprep()
     def use_persistent_block_device_names(self, print_header=True):
         """Scan fstab & grub configuration files and replace all non-persistent
-        device appearences with UUIDs.
+        device references with UUIDs.
         """
 
         if print_header:
             self.out.output("Replacing fstab & grub non-persistent device "
-                            "appearences")
+                            "references")
 
         # convert all devices in fstab to persistent
         persistent_root = self._persistent_fstab()