Break source_is_workdir out of long if statement

This commit is contained in:
Stefano Rivera 2011-01-20 01:28:58 +02:00
parent a5c5215959
commit 4a97dee930

View File

@ -204,9 +204,9 @@ class SourcePackage(object):
self._dsc_source = 'file://' + os.path.abspath(self._dsc_source)
parsed = urlparse.urlparse(self._dsc_source)
if (parsed.scheme != 'file'
or os.path.realpath(os.path.dirname(parsed.path))
!= os.path.realpath(self.workdir)):
source_is_workdir = (os.path.realpath(os.path.dirname(parsed.path))
== os.path.realpath(self.workdir))
if not (parsed.scheme == 'file' and source_is_workdir):
if not self._download_file(self._dsc_source, self.dsc_name):
raise DownloadError('dsc not found')
else: