From c783eb45ddcb4ac736ab42904648f237a2bd886a Mon Sep 17 00:00:00 2001 From: Bastian Blank Date: Mon, 5 Feb 2007 09:34:24 +0000 Subject: [PATCH] debian/bin/genorig.py - Adopt new Changelog structure. - Use rmtree from shutil. svn path=/dists/trunk/linux-2.6/; revision=8261 --- debian/bin/genorig.py | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/debian/bin/genorig.py b/debian/bin/genorig.py index c41ad9f19..359a7cb5f 100755 --- a/debian/bin/genorig.py +++ b/debian/bin/genorig.py @@ -3,9 +3,8 @@ import sys sys.path.append("debian/lib/python") -import os, os.path, re -from debian_linux.debian import read_changelog -from debian_linux.utils import rmtree +import os, os.path, re, shutil +from debian_linux.debian import Changelog class main(object): def __init__(self, input_tar, input_patch = None): @@ -14,9 +13,9 @@ class main(object): self.input_tar = input_tar self.input_patch = input_patch - changelog = read_changelog()[0] - source = changelog['Source'] - version = changelog['Version']['linux']['source_upstream'] + changelog = Changelog()[0] + source = changelog.source + version = changelog.version.upstream self.orig = '%s-%s' % (source, version) self.orig_tar = '%s_%s.orig.tar.gz' % (source, version) @@ -28,7 +27,7 @@ class main(object): self.patch() self.tar() finally: - rmtree(self.dir) + shutil.rmtree(self.dir) def extract(self): self.log("Extracting tarball %s\n" % self.input_tar)