mirror of
https://github.com/naruxde/revpicommander.git
synced 2025-11-08 16:43:53 +01:00
Bugfixes - IP regex, Queue handling, file upload
This commit is contained in:
3
.idea/misc.xml
generated
3
.idea/misc.xml
generated
@@ -3,6 +3,9 @@
|
||||
<component name="JavaScriptSettings">
|
||||
<option name="languageLevel" value="ES6" />
|
||||
</component>
|
||||
<component name="ProjectPlainTextFileTypeManager">
|
||||
<file url="file://$PROJECT_DIR$/revpicommander/locale/revpicommander_de.ts" />
|
||||
</component>
|
||||
<component name="ProjectRootManager" version="2" project-jdk-name="Python 3.8" project-jdk-type="Python SDK" />
|
||||
<component name="PythonCompatibilityInspectionAdvertiser">
|
||||
<option name="version" value="3" />
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
u"""Manager for ACL lists."""
|
||||
"""Manager for ACL lists."""
|
||||
__author__ = "Sven Sager"
|
||||
__copyright__ = "Copyright (C) 2018 Sven Sager"
|
||||
__license__ = "GPLv3"
|
||||
@@ -20,7 +20,7 @@ class AclManager(QtWidgets.QDialog, Ui_diag_aclmanager):
|
||||
self.setupUi(self)
|
||||
self.setFixedSize(self.size())
|
||||
|
||||
self.__re_ipacl = compile(r"([\d*]{1,3}\.){3}[\d*]{1,3},-1")
|
||||
self.__re_ipacl = compile(r"(25[0-5]|(2[0-4]|[01]?\d|)\d)(\.(25[0-5]|(2[0-4]|[01]?\d|)\d)){3},-1")
|
||||
self.__dict_acltext = {}
|
||||
self.__cbb_level_loaded_index = 0
|
||||
self.__mrk_message_shown = 0
|
||||
|
||||
@@ -353,6 +353,7 @@ class ConnectionManager(QtCore.QThread):
|
||||
# Get new connection information to create object in this thread
|
||||
item = self._cli_connect.get()
|
||||
sp = ServerProxy("http://{0}:{1}".format(*item))
|
||||
self._cli_connect.task_done()
|
||||
|
||||
if sp:
|
||||
try:
|
||||
|
||||
@@ -7,7 +7,6 @@ __license__ = "GPLv3"
|
||||
import gzip
|
||||
import os
|
||||
from enum import IntEnum
|
||||
from os import DirEntry, scandir
|
||||
from xmlrpc.client import Binary
|
||||
|
||||
from PyQt5 import QtCore, QtGui, QtWidgets
|
||||
@@ -79,6 +78,7 @@ class RevPiFiles(QtWidgets.QMainWindow, Ui_win_files):
|
||||
uploaded = True # Will be False, when opt_program was found in files
|
||||
ec = 0
|
||||
|
||||
# todo: Do this in a thread with status bar to prevent freezing program on long upload times
|
||||
for file_name in self.file_list_local():
|
||||
# todo: Check exception of local file
|
||||
with open(file_name, "rb") as fh:
|
||||
@@ -152,6 +152,9 @@ class RevPiFiles(QtWidgets.QMainWindow, Ui_win_files):
|
||||
if "plcdownload_file" not in helper.cm.xml_funcs:
|
||||
self.btn_to_left.setEnabled(False)
|
||||
self.btn_to_left.setToolTip(self.tr("The RevPiPyLoad version on the Revolution Pi is to old."))
|
||||
elif not helper.cm.develop_watch_path:
|
||||
self.btn_to_left.setEnabled(False)
|
||||
self.btn_to_left.setToolTip(self.tr("Choose a local directory first."))
|
||||
else:
|
||||
self.btn_to_left.setEnabled(state_revpi)
|
||||
|
||||
@@ -230,7 +233,7 @@ class RevPiFiles(QtWidgets.QMainWindow, Ui_win_files):
|
||||
)
|
||||
return
|
||||
|
||||
for de in os.scandir(base_dir): # type: DirEntry
|
||||
for de in os.scandir(base_dir): # type: os.DirEntry
|
||||
|
||||
if self.tree_files_counter > self.tree_files_counter_max:
|
||||
return
|
||||
@@ -459,7 +462,7 @@ class RevPiFiles(QtWidgets.QMainWindow, Ui_win_files):
|
||||
"""Upload selected files to revolution pi."""
|
||||
pi.logger.debug("RevPiFiles.on_btn_to_right_pressed")
|
||||
self._do_my_job(False)
|
||||
self.file_list_revpi()
|
||||
self._load_files_revpi(True)
|
||||
|
||||
@QtCore.pyqtSlot()
|
||||
def on_btn_to_left_pressed(self):
|
||||
|
||||
@@ -117,10 +117,6 @@ class RevPiLogfile(QtWidgets.QMainWindow, Ui_win_revpilogfile):
|
||||
|
||||
self._load_gui_settings()
|
||||
|
||||
def __del__(self):
|
||||
pi.logger.debug("RevPiLogfile.__del__")
|
||||
self.th_data.deleteLater()
|
||||
|
||||
def _create_data_thread(self):
|
||||
self.th_data.deleteLater()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user