From 5da0ff1a33c6a971b9c6d315448f9edde08ddb82 Mon Sep 17 00:00:00 2001 From: "t.moriyama" Date: Sun, 9 Jun 2013 03:12:50 +0900 Subject: [PATCH] rename commonutils.py to utils/common.py --- linkpair/utils/__init__.py | 0 linkpair/{commonutils.py => utils/common.py} | 13 +++++++++++-- 2 files changed, 11 insertions(+), 2 deletions(-) create mode 100755 linkpair/utils/__init__.py rename linkpair/{commonutils.py => utils/common.py} (83%) diff --git a/linkpair/utils/__init__.py b/linkpair/utils/__init__.py new file mode 100755 index 0000000..e69de29 diff --git a/linkpair/commonutils.py b/linkpair/utils/common.py similarity index 83% rename from linkpair/commonutils.py rename to linkpair/utils/common.py index 1b28b7f..5606fc1 100755 --- a/linkpair/commonutils.py +++ b/linkpair/utils/common.py @@ -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 -- 2.11.0