mirror of
https://github.com/MCV-Software/TWBlue.git
synced 2025-07-18 06:06:06 -04:00
Changed codebase's syntax before attempt the python3 migration later. #273
This commit is contained in:
@@ -16,10 +16,11 @@
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
############################################################
|
||||
from __future__ import absolute_import
|
||||
import widgetUtils
|
||||
import wx_ui
|
||||
import wx_transfer_dialogs
|
||||
import transfer
|
||||
from . import wx_ui
|
||||
from . import wx_transfer_dialogs
|
||||
from . import transfer
|
||||
import output
|
||||
import tempfile
|
||||
import sound
|
||||
|
@@ -1,9 +1,10 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
from __future__ import absolute_import
|
||||
import sys
|
||||
import threading
|
||||
import time
|
||||
import logging
|
||||
from utils import convert_bytes
|
||||
from .utils import convert_bytes
|
||||
from pubsub import pub
|
||||
log = logging.getLogger("extra.AudioUploader.transfer")
|
||||
from requests_toolbelt.multipart.encoder import MultipartEncoder, MultipartEncoderMonitor
|
||||
@@ -75,9 +76,9 @@ class Upload(object):
|
||||
data = self.response.json()
|
||||
except:
|
||||
return _("Error in file upload: {0}").format(self.data.content,)
|
||||
if data.has_key("url") and data["url"] != "0":
|
||||
if "url" in data and data["url"] != "0":
|
||||
return data["url"]
|
||||
elif data.has_key("error") and data["error"] != "0":
|
||||
elif "error" in data and data["error"] != "0":
|
||||
return data["error"]
|
||||
else:
|
||||
return _("Error in file upload: {0}").format(self.data.content,)
|
@@ -1,6 +1,7 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
from __future__ import absolute_import
|
||||
import wx
|
||||
from utils import *
|
||||
from .utils import *
|
||||
import widgetUtils
|
||||
|
||||
class UploadDialog(widgetUtils.BaseDialog):
|
||||
|
Reference in New Issue
Block a user