ALT Linux repositórios
S: | 3.23.8-alt1 |
5.0: | 2.8.10-alt3 |
4.1: | 2.8.10-alt2.M41.1 |
4.0: | 2.7.12-alt2.M40.1 |
+backports: | 2.8.10-alt2.M40.1 |
3.0: | |
+backports: | 1.6.6a-alt0.M30.4.1 |
Group :: Edição
RPM: hplip
Main Changelog Spec Patches Sources Download Gear Bugs e FR Repocop
Patch: hplip-add-ppd-crash.patch
Download
Download
diff --git a/hplip/setup.py b/hplip/setup.py
index 2608f959f..c6e6b08ef 100755
--- a/hplip/setup.py
+++ b/hplip/setup.py
@@ -553,6 +553,9 @@ else: # INTERACTIVE_MODE
if file_path.endswith('.gz'):
nickname = gzip.GzipFile(file_path, 'r').read(4096)
+ if sys.version_info[0] > 2:
+ nickname = nickname.decode('utf-8')
+
else:
nickname = open(file_path, 'r').read(4096)
diff --git a/hplip/ui5/setupdialog.py b/hplip/ui5/setupdialog.py
index 003bd6e0a..646574db7 100644
--- a/hplip/ui5/setupdialog.py
+++ b/hplip/ui5/setupdialog.py
@@ -765,10 +765,9 @@ class SetupDialog(QDialog, Ui_Dialog):
pass
def OtherPPDButton_clicked(self, b):
- ppd_file = to_unicode(QFileDialog.getOpenFileName(self, self.__tr("Select PPD File"),
- sys_conf.get(
- 'dirs', 'ppd'),
- self.__tr("PPD Files (*.ppd *.ppd.gz);;All Files (*)")))
+ ppd_file = QFileDialog.getOpenFileName(self, self.__tr("Select PPD File"),
+ sys_conf.get('dirs', 'ppd'),
+ self.__tr("PPD Files (*.ppd *.ppd.gz);;All Files (*)"))[0]
if ppd_file and os.path.exists(ppd_file):
self.print_ppd = (ppd_file, cups.getPPDDescription(ppd_file))