Skip to content

Commit

Permalink
revert workspace
Browse files Browse the repository at this point in the history
  • Loading branch information
arohanajit committed Sep 21, 2024
1 parent 2279cf4 commit cc2dd7e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 13 deletions.
1 change: 1 addition & 0 deletions .flake8
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ per-file-ignores =
gui/wxpython/core/settings.py: E722
gui/wxpython/core/toolboxes.py: E722
gui/wxpython/core/utils.py: E722
gui/wxpython/core/workspace.py: E722
gui/wxpython/datacatalog/tree.py: E731, E402
gui/wxpython/dbmgr/base.py: E722
gui/wxpython/dbmgr/dialogs.py: E722
Expand Down
17 changes: 4 additions & 13 deletions gui/wxpython/core/workspace.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
from core.utils import normalize_whitespace
from core.settings import UserSettings
from core.gcmd import EncodeString, GetDefaultEncoding
from core.debug import Debug
from nviz.main import NvizSettings

from grass.script import core as gcore
Expand Down Expand Up @@ -124,8 +123,8 @@ def __processFile(self):
try:
self.layerManager["pos"] = (posVal[0], posVal[1])
self.layerManager["size"] = (posVal[2], posVal[3])
except Exception as e:
Debug.msg(1, f"Error setting layer manager position/size: {e}")
except:
pass
# current working directory
cwdPath = self.__getNodeText(node_lm, "cwd")
if cwdPath:
Expand Down Expand Up @@ -156,8 +155,7 @@ def __processFile(self):
try:
pos = (posVal[0], posVal[1])
size = (posVal[2], posVal[3])
except Exception as e:
Debug.msg(1, f"Error setting layer manager position/size: {e}")
except:
pos = None
size = None
# this happens on Windows when mapwindow is minimized when
Expand Down Expand Up @@ -2021,14 +2019,7 @@ def _get_value(self, line):
"""Get value of element"""
try:
return line.strip(" ").split(" ")[1].strip(" ")
except IndexError:
print("Error: Line does not contain at least two words")
return ""
except AttributeError:
print("Error: Input is not a string")
return ""
except Exception as e:
print(f"Unexpected error: {e}")
except:
return ""

def _get_element(self, line):
Expand Down

0 comments on commit cc2dd7e

Please sign in to comment.