odk/examples/python/Spreadsheet/EuroAdaption.py |   12 ------------
 odk/examples/python/Spreadsheet/SCalc.py        |    6 ------
 2 files changed, 18 deletions(-)

New commits:
commit 4058ca814a794cc80a4ebb2089df95798b2de85e
Author:     Ilmari Lauhakangas <ilmari.lauhakan...@libreoffice.org>
AuthorDate: Wed Jul 17 18:24:25 2024 +0300
Commit:     Ilmari Lauhakangas <ilmari.lauhakan...@libreoffice.org>
CommitDate: Wed Jul 17 19:39:56 2024 +0200

    tdf#158803 related: remove unnecessary comments
    
    Change-Id: I25093100db0473bb907036b4f80e1bbc440cfb8c
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/170639
    Reviewed-by: Ilmari Lauhakangas <ilmari.lauhakan...@libreoffice.org>
    Tested-by: Ilmari Lauhakangas <ilmari.lauhakan...@libreoffice.org>

diff --git a/odk/examples/python/Spreadsheet/EuroAdaption.py 
b/odk/examples/python/Spreadsheet/EuroAdaption.py
index 920af8650581..594fdc9d7113 100644
--- a/odk/examples/python/Spreadsheet/EuroAdaption.py
+++ b/odk/examples/python/Spreadsheet/EuroAdaption.py
@@ -25,8 +25,6 @@ def get_desktop():
             print("Can't create a desktop. No connection, no remote office 
servicemanager available!")
         else:
             desktop = 
srv_mgr.createInstanceWithContext("com.sun.star.frame.Desktop", remote_context)
-    # removing bare except: and handling it similar to the try/except already
-    # committed in './SCalc.py'
     except Exception as e:
         print(f"Failed to get desktop: {e}")
         traceback.print_exc()
@@ -50,8 +48,6 @@ def get_number_format_key(number_formats, format: str, 
language) -> int:
             # If not exist, create a new one
             if (key := number_formats.addNew(format, language)) == -1:
                 key == 0
-    # removing bare except: and handling it similar to the try/except already
-    # committed in './SCalc.py'
     except Exception as e:
         print(f"Failed to get key: {e}")
         traceback.print_exc()
@@ -79,8 +75,6 @@ def create_example_data(sheet, number_formats):
             cell.NumberFormat = number_format_key
             cell_range = sheet[counter + 1:counter + 2, 2:3]
             cell_range.NumberFormat = number_format_key
-    # removing bare except: and handling it similar to the try/except already
-    # committed in './SCalc.py'
     except Exception as e:
         print(f"Failed to create example data: {e}")
         traceback.print_exc()
@@ -128,8 +122,6 @@ def convert(sheet, number_formats, old_symbol: str, 
new_symbol: str, factor: flo
                 if sheet_cell_ranges.getCount() > 0:
                     for cell in sheet_cell_ranges.getCells():
                         cell.Value = cell.Value / factor
-    # removing bare except: and handling it similar to the try/except already
-    # committed in './SCalc.py'
     except Exception as e:
         print(f"Failed to convert currency: {e}")
         traceback.print_exc()
@@ -143,8 +135,6 @@ def main():
     try:
         doc = desktop.loadComponentFromURL("private:factory/scalc", "_blank", 
0, tuple())
         print("Create a new Spreadsheet")
-    # removing bare except: and handling it similar to the try/except already
-    # committed in './SCalc.py'
     except Exception as e:
         print(f"Failed to load component from URL: {e}")
         traceback.print_exc()
@@ -156,8 +146,6 @@ def main():
 
     try:
         sheet = doc.Sheets[0]
-    # removing bare except: and handling it similar to the try/except already
-    # committed in './SCalc.py'
     except Exception as e:
         print(f"Failed to get sheet: {e}")
         traceback.print_exc()
diff --git a/odk/examples/python/Spreadsheet/SCalc.py 
b/odk/examples/python/Spreadsheet/SCalc.py
index 91e256a64fcc..b77482c7401b 100644
--- a/odk/examples/python/Spreadsheet/SCalc.py
+++ b/odk/examples/python/Spreadsheet/SCalc.py
@@ -36,8 +36,6 @@ def main():
         desktop = srv_mgr.createInstanceWithContext(
             "com.sun.star.frame.Desktop", remote_context
         )
-    # removing bare except: and handling it similar to the try/except already
-    # committed in other parts of this script
     except Exception as e:
         print(f"Couldn't get Sheet: {e}")
         traceback.print_exc()
@@ -52,8 +50,6 @@ def main():
     doc_url = "private:factory/scalc"
     try:
         doc = desktop.loadComponentFromURL(doc_url, "_blank", 0, tuple())
-    # removing bare except: and handling it similar to the try/except already
-    # committed in other parts of this script
     except Exception as e:
         print(f"Couldn't get Sheet: {e}")
         traceback.print_exc()
@@ -76,8 +72,6 @@ def main():
         cell_styles["My Style2"] = cell_style
         cell_style.IsCellBackgroundTransparent = False
         cell_style.CellBackColor = 13421823
-    # removing bare except: and handling it similar to the try/except already
-    # committed in other parts of this script
     except Exception as e:
         print(f"Couldn't get Sheet: {e}")
         traceback.print_exc()
  • core.git: odk/examples Ilmari Lauhakangas (via logerrit)

Reply via email to