diff options
author | Kali Kaneko <kali@leap.se> | 2013-06-20 03:19:57 +0900 |
---|---|---|
committer | kali <kali@leap.se> | 2013-06-20 03:31:08 +0900 |
commit | 9a725220c393f28c3be5bb0f894b9eb7cf9af2ad (patch) | |
tree | 17cf046493bb445bd696333c5ec69e89ea7bbdb1 /src/leap/gui/statuspanel.py | |
parent | cdf63528b09b702400e0aac0c6f39e79a7e29773 (diff) |
fix for empty data
Diffstat (limited to 'src/leap/gui/statuspanel.py')
-rw-r--r-- | src/leap/gui/statuspanel.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/leap/gui/statuspanel.py b/src/leap/gui/statuspanel.py index 19f84d4c..62a22725 100644 --- a/src/leap/gui/statuspanel.py +++ b/src/leap/gui/statuspanel.py @@ -177,11 +177,11 @@ class StatusPanelWidget(QtGui.QWidget): Updates the download/upload labels based on the data provided by the VPN thread """ - upload = float(data[VPNManager.TUNTAP_WRITE_KEY]) + upload = float(data[VPNManager.TUNTAP_WRITE_KEY] or "0") upload = upload / 1000.0 upload_str = "%12.2f Kb" % (upload,) self.ui.lblUpload.setText(upload_str) - download = float(data[VPNManager.TUNTAP_READ_KEY]) + download = float(data[VPNManager.TUNTAP_READ_KEY] or "0") download = download / 1000.0 download_str = "%12.2f Kb" % (download,) self.ui.lblDownload.setText(download_str) |