OSDN Git Service

rename commonutils.py to utils/common.py
authort.moriyama <t.moriyama@users.sourceforge.jp>
Sat, 8 Jun 2013 18:12:50 +0000 (03:12 +0900)
committert.moriyama <t.moriyama@users.sourceforge.jp>
Sat, 8 Jun 2013 18:12:50 +0000 (03:12 +0900)
linkpair/utils/__init__.py [new file with mode: 0755]
linkpair/utils/common.py [moved from linkpair/commonutils.py with 83% similarity]

diff --git a/linkpair/utils/__init__.py b/linkpair/utils/__init__.py
new file mode 100755 (executable)
index 0000000..e69de29
similarity index 83%
rename from linkpair/commonutils.py
rename to linkpair/utils/common.py
index 1b28b7f..5606fc1 100755 (executable)
@@ -19,6 +19,17 @@ class CommonUtils(object):
     def d_pop(self):
         return self._tmp_stack.pop()
 
+    def verbose_out(self, msg):
+        if self.opts.verbose is True:
+            print msg
+
+    def debug_out(self, msg):
+        if self.opts.debug is True:
+            print "debug: " + msg
+
+    def message_out(self, msg):
+        print msg
+
     def parse_remote_desc(self, remote_desc):
         ssh_username = ""
         ssh_hostname = ""
@@ -37,10 +48,8 @@ class CommonUtils(object):
                 ssh_hostport = 22
         return [ssh_username, ssh_hostname, ssh_hostport]
 
-
     def str_join(self, base, added, sep):
         if base is None or base == "":
             return added
         else:
             return base + sep + added
-            
\ No newline at end of file