Skip to content
Snippets Groups Projects
Commit 3d86b296 authored by inso's avatar inso Committed by GitHub
Browse files

Merge pull request #693 from duniter/fix_certification_file

Check certification file value is not empty
parents 75a7e9e3 ad540448
Branches
Tags
No related merge requests found
...@@ -89,7 +89,7 @@ class CertificationView(QWidget, Ui_CertificationWidget): ...@@ -89,7 +89,7 @@ class CertificationView(QWidget, Ui_CertificationWidget):
file_name = QFileDialog.getOpenFileName(self, file_name = QFileDialog.getOpenFileName(self,
self.tr("Open identity document"), "", self.tr("Open identity document"), "",
self.tr("Duniter documents (*.txt)")) self.tr("Duniter documents (*.txt)"))
if file_name: if file_name and file_name[0]:
with open(file_name[0], 'r') as open_file: with open(file_name[0], 'r') as open_file:
raw_text = open_file.read() raw_text = open_file.read()
try: try:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment