From 9306f5edab0ed72e7acde86af6ff2d57fbe378b9 Mon Sep 17 00:00:00 2001
From: Itamar Turner-Trauring <itamar@pythonspeed.com>
Date: Wed, 14 Jun 2023 17:48:13 -0400
Subject: [PATCH] Fix mypy issues

---
 src/allmydata/scripts/admin.py | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/src/allmydata/scripts/admin.py b/src/allmydata/scripts/admin.py
index 02fd9a143..be700bcca 100644
--- a/src/allmydata/scripts/admin.py
+++ b/src/allmydata/scripts/admin.py
@@ -112,6 +112,9 @@ class AddGridManagerCertOptions(BaseOptions):
         return "Usage: tahoe [global-options] admin add-grid-manager-cert [options]"
 
     def postOptions(self) -> None:
+        assert self.parent is not None
+        assert self.parent.parent is not None
+        
         if self['name'] is None:
             raise usage.UsageError(
                 "Must provide --name option"
@@ -123,8 +126,8 @@ class AddGridManagerCertOptions(BaseOptions):
 
         data: str
         if self['filename'] == '-':
-            print("reading certificate from stdin", file=self.parent.parent.stderr)
-            data = self.parent.parent.stdin.read()
+            print("reading certificate from stdin", file=self.parent.parent.stderr)  # type: ignore[attr-defined]
+            data = self.parent.parent.stdin.read()  # type: ignore[attr-defined]
             if len(data) == 0:
                 raise usage.UsageError(
                     "Reading certificate from stdin failed"