# Utility functions
# Copyright (C) 2000, 2001, 2002 James Troup <james@nocrew.org>
-# $Id: utils.py,v 1.44 2002-05-18 23:54:51 troup Exp $
+# $Id: utils.py,v 1.46 2002-05-23 12:36:15 troup Exp $
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-import os, pwd, re, socket, shutil, string, sys, tempfile
+import commands, os, pwd, re, socket, shutil, string, sys, tempfile
import apt_pkg
re_comments = re.compile(r"\#.*")
def validate_changes_file_arg(file, fatal=1):
error = None;
+ orig_filename = file
if file[-6:] == ".katie":
file = file[:-6]+".changes";
if error:
if fatal:
- fubar("%s: %s." % (file, error));
+ fubar("%s: %s." % (orig_filename, error));
else:
- warn("Skipping %s - %s" % (file, error));
+ warn("Skipping %s - %s" % (orig_filename, error));
return None;
else:
return file;