mirror of
https://github.com/webrecorder/pywb.git
synced 2025-03-24 06:59:52 +01:00
make manager commands working with python3 (#279)
This commit is contained in:
parent
85f093e356
commit
a7d9494363
@ -17,14 +17,18 @@ from warcio.timeutils import timestamp20_now
|
|||||||
|
|
||||||
from pywb import DEFAULT_CONFIG
|
from pywb import DEFAULT_CONFIG
|
||||||
|
|
||||||
|
from six.moves import input
|
||||||
|
|
||||||
#=============================================================================
|
#=============================================================================
|
||||||
# to allow testing by mocking get_input
|
# to allow testing by mocking get_input
|
||||||
def get_input(msg): #pragma: no cover
|
|
||||||
return raw_input(msg)
|
|
||||||
|
|
||||||
|
|
||||||
|
def get_input(msg): # pragma: no cover
|
||||||
|
return input(msg)
|
||||||
|
|
||||||
#=============================================================================
|
#=============================================================================
|
||||||
|
|
||||||
|
|
||||||
class CollectionsManager(object):
|
class CollectionsManager(object):
|
||||||
""" This utility is designed to
|
""" This utility is designed to
|
||||||
simplify the creation and management of web archive collections
|
simplify the creation and management of web archive collections
|
||||||
@ -360,7 +364,6 @@ Create manage file based web archive collections
|
|||||||
addwarc.add_argument('files', nargs='+')
|
addwarc.add_argument('files', nargs='+')
|
||||||
addwarc.set_defaults(func=do_add)
|
addwarc.set_defaults(func=do_add)
|
||||||
|
|
||||||
|
|
||||||
# Reindex All
|
# Reindex All
|
||||||
def do_reindex(r):
|
def do_reindex(r):
|
||||||
m = CollectionsManager(r.coll_name)
|
m = CollectionsManager(r.coll_name)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user