allow for get_dbname() returning None
This commit is contained in:
parent
cfa76465b5
commit
f9ecd4b622
@ -185,10 +185,13 @@ class DocReportDialog(ReportDialog):
|
||||
ext = ""
|
||||
else:
|
||||
spath = self.get_default_directory()
|
||||
default_name = self.dbname + "_" + self.raw_name
|
||||
if self.options.get_output():
|
||||
base = os.path.basename(self.options.get_output())
|
||||
else:
|
||||
if self.dbname is None:
|
||||
default_name = self.raw_name
|
||||
else:
|
||||
default_name = self.dbname + "_" + self.raw_name
|
||||
base = "%s.%s" % (default_name, ext)
|
||||
spath = os.path.normpath(os.path.join(spath, base))
|
||||
self.target_fileentry.set_filename(spath)
|
||||
|
@ -165,10 +165,13 @@ class GraphvizReportDialog(ReportDialog):
|
||||
ext = ""
|
||||
else:
|
||||
spath = self.get_default_directory()
|
||||
default_name = self.dbname + "_" + self.raw_name
|
||||
if self.options.get_output():
|
||||
base = os.path.basename(self.options.get_output())
|
||||
else:
|
||||
if self.dbname is None:
|
||||
default_name = self.raw_name
|
||||
else:
|
||||
default_name = self.dbname + "_" + self.raw_name
|
||||
base = "%s%s" % (default_name, ext) # "ext" already has a dot
|
||||
spath = os.path.normpath(os.path.join(spath, base))
|
||||
self.target_fileentry.set_filename(spath)
|
||||
|
Loading…
Reference in New Issue
Block a user