From 5458650f71bebde6334f97740ed0c5cf53acf274 Mon Sep 17 00:00:00 2001 From: Fabian Vogt Date: Wed, 19 Feb 2020 13:57:16 +0100 Subject: [PATCH] Fix typos --- osclib/repochecks.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/osclib/repochecks.py b/osclib/repochecks.py index 2ef2c66c..4bdbf4e0 100644 --- a/osclib/repochecks.py +++ b/osclib/repochecks.py @@ -4,6 +4,7 @@ import re import requests import subprocess import tempfile +import glob from fnmatch import fnmatch from lxml import etree as ETL from osc.core import http_GET @@ -174,12 +175,12 @@ def mirrorRepomd(cachedir, url): primarypath = repoindex.xpath("string(./repo:data[@type='primary']/repo:location/@href)", namespaces={'repo': 'http://linux.duke.edu/metadata/repo'}) if not primarypath.endswith(".xml.gz"): - raise Excpetion('unsupported primary format') + raise Exception('unsupported primary format') primarydest = os.path.join(cachedir, os.path.basename(primarypath)) if not os.path.exists(primarydest): # Delete the old files first - for oldfile in glob.glob(glob.escape(directory) + "/*.xml.gz"): + for oldfile in glob.glob(glob.escape(cachedir) + "/*.xml.gz"): os.unlink(oldfile) with tempfile.NamedTemporaryFile(dir=cachedir) as primarytemp: