Commit 98cc0d5a authored by Tijmen de Mes's avatar Tijmen de Mes

Syntax fixes

parent 466278c1
......@@ -214,4 +214,3 @@ class Blink(QApplication, metaclass=QSingleton):
log.error('Fatal error:\n{}'.format(notification.data.traceback))
QMessageBox.critical(self.main_window, "Fatal Error", "A fatal error occurred, {} will now exit.".format(self.applicationName()))
sys.exit(1)
......@@ -2641,5 +2641,3 @@ class VideoScreenshot(object):
filename = next(filename for filename in self.filename_generator() if not os.path.exists(filename))
makedirs(os.path.dirname(filename))
self.image.save(filename)
......@@ -65,7 +65,6 @@ class SoundSettings(SettingsGroup):
inbound_ringtone = Setting(type=SoundFile, default=None, nillable=True)
class XCAPSettingsExtension(XCAPSettings):
enabled = Setting(type=bool, default=True)
icon = RuntimeSetting(type=IconDescriptor, nillable=True, default=None)
......
......@@ -36,7 +36,7 @@ class HistoryManager(object, metaclass=Singleton):
if not isinstance(data, list) or not all(isinstance(item, HistoryEntry) and item.text and isinstance(item.call_time, ISOTimestamp) for item in data):
raise ValueError("invalid save data")
except Exception as e:
traceback.print_exc()
traceback.print_exc()
self.calls = []
else:
self.calls = data[-self.history_size:]
......@@ -68,7 +68,7 @@ class HistoryManager(object, metaclass=Singleton):
return
session = notification.sender
entry = HistoryEntry.from_session(session)
if session.direction == 'incoming':
if notification.data.code != 487 or notification.data.failure_reason != 'Call completed elsewhere':
entry.failed = True
......@@ -192,7 +192,7 @@ class HistoryEntry(object):
user = user.decode() if isinstance(user, bytes) else user
domain = domain.decode() if isinstance(domain, bytes) else domain
remote_uri = '%s@%s' % (user, domain)
match = cls.phone_number_re.match(remote_uri)
if match:
......
......@@ -930,6 +930,7 @@ class MainWindow(base_class, ui_class):
self.pending_watcher_dialogs.append(dialog)
dialog.show()
def _NH_BlinkSessionNewOutgoing(self, notification):
self.search_box.clear()
......
......@@ -459,7 +459,6 @@ class PreferencesWindow(base_class, ui_class, metaclass=QSingleton):
self.idd_prefix_label.setMinimumWidth(text_width)
self.tls_cert_file_label.setMinimumWidth(text_width)
# audio settings
font_metrics = self.answer_delay_label.fontMetrics() # we assume all labels have the same font
labels = (self.audio_input_device_label, self.audio_output_device_label, self.audio_alert_device_label, self.audio_sample_rate_label,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment