Fix modularity browser find file invalid access

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Unresolved
    • Priority: Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • None
    • Server Programmability
    • ALL
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      From slack:

      After running browse.py and searching for/hitting 'enter' on the file 'cluster_write.h', I get:

      (venv) ➜  mongo git:(SERVER-111146-router-non-private) modules_poc/browse.py
      ╭─────────────────────────────────────────────────────────────────────────── Traceback (most recent call last) ───────────────────────────────────────────────────────────────────────────╮
      │ /home/ubuntu/mirror/mongo/modules_poc/browse.py:537 in seek                                                                                                                             │
      │                                                                                                                                                                                         │
      │   534 │   │                                                                                                                                                                             │
      │   535 │   │   def seek(file):                                                                                                                                                           │
      │   536 │   │   │   for row in tree.root.children:                                                                                                                                        │
      │ ❱ 537 │   │   │   │   if row.data.name == file.name:                                                                                                                                    │
      │   538 │   │   │   │   │   tree.center_scroll = True                                                                                                                                     │
      │   539 │   │   │   │   │   row.expand()                                                                                                                                                  │
      │   540 │   │   │   │   │   tree.move_cursor(row, animate=True)                                                                                                                           │
      │                                                                                                                                                                                         │
      │ ╭──────────────────────────────────────────────────────── locals ────────────────────────────────────────────────────────╮                                                              │
      │ │ file = File(                                                                                                           │                                                              │
      │ │        │   name='src/mongo/s/cluster_write.h',                                                                         │                                                              │
      │ │  ───────────────────────────────────────────────────────────────────────────────────────────────╯
      AttributeError: 'NoneType' object has no attribute 'name' 

            Assignee:
            Alex Li
            Reporter:
            Alex Li
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: