Skip to content

Commit

Permalink
Show basename instead of path in log
Browse files Browse the repository at this point in the history
  • Loading branch information
marioba committed Jan 31, 2019
1 parent c0fdb30 commit a188415
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions comptages/comptages.py
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,8 @@ def import_file(self, file_path, count_id=None):
return

QgsMessageLog.logMessage(
'Importation {}'.format(file_path), 'Comptages', Qgis.Info)
'Importation {}'.format(os.path.basename(file_path)),
'Comptages', Qgis.Info)

file_format = file_header['FORMAT']

Expand All @@ -219,7 +220,8 @@ def import_file(self, file_path, count_id=None):
task = DataImporterInt2(file_path, count_id)
else:
push_info('Format {} of {} not supported'.format(
file_format, file_path))
file_format,
os.path.basename(file_path)))
return

self.tm.addTask(task)
Expand Down

0 comments on commit a188415

Please sign in to comment.