Fix import and except syntax for python3.
This commit is contained in:
parent
ed16f0bb5b
commit
01fd368c97
@ -18,8 +18,7 @@
|
|||||||
import locale
|
import locale
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
from . import p3
|
from .p3 import input
|
||||||
from p3 import input
|
|
||||||
|
|
||||||
|
|
||||||
class UserError(Exception):
|
class UserError(Exception):
|
||||||
|
@ -1,19 +1,19 @@
|
|||||||
# core
|
# core
|
||||||
import init_cmd
|
from . import init_cmd
|
||||||
import add_cmd
|
from . import add_cmd
|
||||||
import rename_cmd
|
from . import rename_cmd
|
||||||
import remove_cmd
|
from . import remove_cmd
|
||||||
import list_cmd
|
from . import list_cmd
|
||||||
# doc
|
# doc
|
||||||
import attach_cmd
|
from . import attach_cmd
|
||||||
import open_cmd
|
from . import open_cmd
|
||||||
import tag_cmd
|
from . import tag_cmd
|
||||||
import note_cmd
|
from . import note_cmd
|
||||||
# bulk
|
# bulk
|
||||||
import export_cmd
|
from . import export_cmd
|
||||||
import import_cmd
|
from . import import_cmd
|
||||||
# bonus
|
# bonus
|
||||||
import websearch_cmd
|
from . import websearch_cmd
|
||||||
|
|
||||||
import edit_cmd
|
from . import edit_cmd
|
||||||
# import update_cmd
|
# from . import update_cmd
|
||||||
|
@ -112,6 +112,6 @@ def command(args):
|
|||||||
try:
|
try:
|
||||||
p.docpath = docfile
|
p.docpath = docfile
|
||||||
rp.push_paper(p)
|
rp.push_paper(p)
|
||||||
except ValueError, v:
|
except ValueError as v:
|
||||||
ui.error(v.message)
|
ui.error(v.message)
|
||||||
ui.exit(1)
|
ui.exit(1)
|
||||||
|
@ -39,9 +39,9 @@ def command(args):
|
|||||||
pass # TODO warn if file does not exists
|
pass # TODO warn if file does not exists
|
||||||
paper.docpath = document
|
paper.docpath = document
|
||||||
rp.push_paper(paper, overwrite=True, event=False)
|
rp.push_paper(paper, overwrite=True, event=False)
|
||||||
except ValueError, v:
|
except ValueError as v:
|
||||||
ui.error(v.message)
|
ui.error(v.message)
|
||||||
ui.exit(1)
|
ui.exit(1)
|
||||||
except IOError, v:
|
except IOError as v:
|
||||||
ui.error(v.message)
|
ui.error(v.message)
|
||||||
ui.exit(1)
|
ui.exit(1)
|
||||||
|
@ -3,7 +3,7 @@ from datetime import datetime
|
|||||||
|
|
||||||
from . import bibstruct
|
from . import bibstruct
|
||||||
from . import events
|
from . import events
|
||||||
from datacache import DataCache
|
from .datacache import DataCache
|
||||||
from .paper import Paper
|
from .paper import Paper
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user