瀏覽代碼

Remove or space out suspension dots after service name for easier copy-pasting

Signed-off-by: Joffrey F <[email protected]>
Joffrey F 10 年之前
父節點
當前提交
6da7a9194c
共有 2 個文件被更改,包括 12 次插入12 次删除
  1. 10 10
      compose/service.py
  2. 2 2
      compose/utils.py

+ 10 - 10
compose/service.py

@@ -143,27 +143,27 @@ class Service(object):
     # TODO: remove these functions, project takes care of starting/stopping,
     def stop(self, **options):
         for c in self.containers():
-            log.info("Stopping %s..." % c.name)
+            log.info("Stopping %s" % c.name)
             c.stop(**options)
 
     def pause(self, **options):
         for c in self.containers(filters={'status': 'running'}):
-            log.info("Pausing %s..." % c.name)
+            log.info("Pausing %s" % c.name)
             c.pause(**options)
 
     def unpause(self, **options):
         for c in self.containers(filters={'status': 'paused'}):
-            log.info("Unpausing %s..." % c.name)
+            log.info("Unpausing %s" % c.name)
             c.unpause()
 
     def kill(self, **options):
         for c in self.containers():
-            log.info("Killing %s..." % c.name)
+            log.info("Killing %s" % c.name)
             c.kill(**options)
 
     def restart(self, **options):
         for c in self.containers():
-            log.info("Restarting %s..." % c.name)
+            log.info("Restarting %s" % c.name)
             c.restart(**options)
 
     # end TODO
@@ -289,7 +289,7 @@ class Service(object):
         )
 
         if 'name' in container_options and not quiet:
-            log.info("Creating %s..." % container_options['name'])
+            log.info("Creating %s" % container_options['name'])
 
         return Container.create(self.client, **container_options)
 
@@ -423,7 +423,7 @@ class Service(object):
         volumes can be copied to the new container, before the original
         container is removed.
         """
-        log.info("Recreating %s..." % container.name)
+        log.info("Recreating %s" % container.name)
         try:
             container.stop(timeout=timeout)
         except APIError as e:
@@ -453,7 +453,7 @@ class Service(object):
         if container.is_running:
             return container
         else:
-            log.info("Starting %s..." % container.name)
+            log.info("Starting %s" % container.name)
             return self.start_container(container)
 
     def start_container(self, container):
@@ -462,7 +462,7 @@ class Service(object):
 
     def remove_duplicate_containers(self, timeout=DEFAULT_TIMEOUT):
         for c in self.duplicate_containers():
-            log.info('Removing %s...' % c.name)
+            log.info('Removing %s' % c.name)
             c.stop(timeout=timeout)
             c.remove()
 
@@ -689,7 +689,7 @@ class Service(object):
         )
 
     def build(self, no_cache=False):
-        log.info('Building %s...' % self.name)
+        log.info('Building %s' % self.name)
 
         path = self.options['build']
         # python2 os.path() doesn't support unicode, so we need to encode it to

+ 2 - 2
compose/utils.py

@@ -90,13 +90,13 @@ def write_out_msg(stream, lines, msg_index, msg, status="done"):
         stream.write("%c[%dA" % (27, diff))
         # erase
         stream.write("%c[2K\r" % 27)
-        stream.write("{} {}... {}\n".format(msg, obj_index, status))
+        stream.write("{} {} ... {}\n".format(msg, obj_index, status))
         # move back down
         stream.write("%c[%dB" % (27, diff))
     else:
         diff = 0
         lines.append(obj_index)
-        stream.write("{} {}... \r\n".format(msg, obj_index))
+        stream.write("{} {} ... \r\n".format(msg, obj_index))
 
     stream.flush()