From: Rob Browning Date: Sat, 20 Jan 2018 20:17:14 +0000 (-0600) Subject: path_components: adjust exception raise for py3 X-Git-Tag: 0.30~115 X-Git-Url: https://arthur.barton.de/gitweb/?a=commitdiff_plain;ds=sidebyside;h=f2df756ec9ddeec3bef3c6a176ee0fd75c42e6bf;p=bup.git path_components: adjust exception raise for py3 Signed-off-by: Rob Browning Tested-by: Rob Browning --- diff --git a/lib/bup/helpers.py b/lib/bup/helpers.py index e7df232..0f3df66 100644 --- a/lib/bup/helpers.py +++ b/lib/bup/helpers.py @@ -1060,7 +1060,7 @@ def path_components(path): Example: '/home/foo' -> [('', '/'), ('home', '/home'), ('foo', '/home/foo')]""" if not path.startswith('/'): - raise Exception, 'path must start with "/": %s' % path + raise Exception('path must start with "/": %s' % path) # Since we assume path startswith('/'), we can skip the first element. result = [('', '/')] norm_path = os.path.abspath(path)