Merge pull request #18 from gnome-terminator/compat-2.7
Fix some compat issues for Python 2.7
This commit is contained in:
commit
7be1754a47
|
@ -13,14 +13,14 @@ jobs:
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
python:
|
python:
|
||||||
#- '2.7'
|
- '2.7'
|
||||||
- '3.6'
|
- '3.6'
|
||||||
- '3.7'
|
- '3.7'
|
||||||
- '3.8'
|
- '3.8'
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
|
|
||||||
- name: Set up Python ${{ matrix.python }}
|
- name: Set up Python ${{ matrix.python }}
|
||||||
uses: actions/setup-python@v1
|
uses: actions/setup-python@v1
|
||||||
with:
|
with:
|
||||||
|
|
|
@ -10,7 +10,10 @@ from gi.repository import GLib, GObject, Pango, Gtk, Gdk
|
||||||
gi.require_version('Vte', '2.91') # vte-0.38 (gnome-3.14)
|
gi.require_version('Vte', '2.91') # vte-0.38 (gnome-3.14)
|
||||||
from gi.repository import Vte
|
from gi.repository import Vte
|
||||||
import subprocess
|
import subprocess
|
||||||
import urllib.request, urllib.parse, urllib.error
|
try:
|
||||||
|
from urllib.parse import unquote as urlunquote
|
||||||
|
except ImportError:
|
||||||
|
from urllib import unquote as urlunquote
|
||||||
|
|
||||||
from .util import dbg, err, spawn_new_terminator, make_uuid, manual_lookup, display_manager
|
from .util import dbg, err, spawn_new_terminator, make_uuid, manual_lookup, display_manager
|
||||||
from . import util
|
from . import util
|
||||||
|
@ -1120,7 +1123,7 @@ class Terminal(Gtk.VBox):
|
||||||
str=''
|
str=''
|
||||||
for fname in txt_lines[:-1]:
|
for fname in txt_lines[:-1]:
|
||||||
dbg('drag data fname: %s' % fname)
|
dbg('drag data fname: %s' % fname)
|
||||||
fname = "'%s'" % urllib.parse.unquote(fname[7:].replace("'",
|
fname = "'%s'" % urlunquote(fname[7:].replace("'",
|
||||||
'\'\\\'\''))
|
'\'\\\'\''))
|
||||||
str += fname + ' '
|
str += fname + ' '
|
||||||
txt=str
|
txt=str
|
||||||
|
|
|
@ -15,6 +15,8 @@
|
||||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
"""Terminator.util - misc utility functions"""
|
"""Terminator.util - misc utility functions"""
|
||||||
|
|
||||||
|
from __future__ import print_function
|
||||||
|
|
||||||
import sys
|
import sys
|
||||||
import cairo
|
import cairo
|
||||||
import os
|
import os
|
||||||
|
@ -24,6 +26,7 @@ import uuid
|
||||||
import subprocess
|
import subprocess
|
||||||
import gi
|
import gi
|
||||||
|
|
||||||
|
|
||||||
try:
|
try:
|
||||||
gi.require_version('Gtk','3.0')
|
gi.require_version('Gtk','3.0')
|
||||||
from gi.repository import Gtk, Gdk
|
from gi.repository import Gtk, Gdk
|
||||||
|
|
Loading…
Reference in New Issue