Skip to content

Commit bd7a372

Browse files
committed
Add compatibility with python 2
1 parent 7aa7873 commit bd7a372

File tree

1 file changed

+10
-5
lines changed

1 file changed

+10
-5
lines changed

zerobin/remove_paste.py

+10-5
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
1+
#!/usr/bin/env python
2+
# coding: utf-8
3+
14
from zerobin.paste import Paste
5+
from sigtools.modifiers import annotate, autokwoargs
26
from clize import run
37
import re
48

@@ -16,17 +20,18 @@ def unpack_paste(paste):
1620
return try_url.group('paste_id')
1721
return paste
1822

19-
20-
def remove_paste(*pastes, quiet:'q'=False):
23+
@annotate(quiet='q')
24+
@autokwoargs
25+
def remove_paste(quiet=False, *pastes):
2126
"""
2227
Remove pastes, given its ID or its URL
2328
24-
pastes: List of pastes, given by ID or URL
25-
2629
quiet: Don't print anything
30+
31+
pastes: List of pastes, given by ID or URL
2732
"""
2833

29-
for paste_uuid in map(unpack_paste, paste_list):
34+
for paste_uuid in map(unpack_paste, pastes):
3035
try:
3136
Paste.load(paste_uuid).delete()
3237

0 commit comments

Comments
 (0)