瀏覽代碼

Pass through standard remove_container options

Ben Firshman 11 年之前
父節點
當前提交
5be8a37b7e
共有 2 個文件被更改,包括 5 次插入4 次删除
  1. 4 2
      fig/cli/main.py
  2. 1 2
      fig/container.py

+ 4 - 2
fig/cli/main.py

@@ -183,8 +183,10 @@ class TopLevelCommand(Command):
             print("Going to remove", list_containers(stopped_containers))
             if options.get('--force') \
                     or yesno("Are you sure? [yN] ", default=False):
-                self.project.remove_stopped(service_names=options['SERVICE'],
-                                            remove_volumes=options.get('-v', False))
+                self.project.remove_stopped(
+                    service_names=options['SERVICE'],
+                    v=options.get('-v', False)
+                )
         else:
             print("No stopped containers")
 

+ 1 - 2
fig/container.py

@@ -112,8 +112,7 @@ class Container(object):
         return self.client.kill(self.id)
 
     def remove(self, **options):
-        v = options.get('remove_volumes', False)
-        return self.client.remove_container(self.id, v=v)
+        return self.client.remove_container(self.id, **options)
 
     def inspect_if_not_inspected(self):
         if not self.has_been_inspected: