From 84850ccbceb0836ac3851066e745d77d5bbbf889 Mon Sep 17 00:00:00 2001 From: Sol Jerome Date: Fri, 12 Apr 2013 11:54:37 -0500 Subject: bcfg2-reports: Fix exception handling Signed-off-by: Sol Jerome --- src/sbin/bcfg2-reports | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/sbin') diff --git a/src/sbin/bcfg2-reports b/src/sbin/bcfg2-reports index 2c4a918be..bb45e0009 100755 --- a/src/sbin/bcfg2-reports +++ b/src/sbin/bcfg2-reports @@ -233,7 +233,8 @@ def main(): try: entries = [l.strip().split(":") for l in open(options.file)] - except IOError, err: + except IOError: + err = sys.exc_info()[1] print("Cannot read entries from %s: %s" % (options.file, err)) return 2 -- cgit v1.2.3-1-g7c22