From c27964813f699730390ae9746cd674d850890654 Mon Sep 17 00:00:00 2001 From: meejah Date: Wed, 28 Nov 2018 01:06:58 -0700 Subject: [PATCH] fix a bug --- src/allmydata/scripts/tahoe_grid_manager.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/allmydata/scripts/tahoe_grid_manager.py b/src/allmydata/scripts/tahoe_grid_manager.py index 6fbdd4f7b..f7193cbf2 100644 --- a/src/allmydata/scripts/tahoe_grid_manager.py +++ b/src/allmydata/scripts/tahoe_grid_manager.py @@ -411,9 +411,10 @@ def _remove(gridoptions, options): "No storage-server called '{}' exists".format(options['name']) ) cert_count = 0 - while fp.child('{}.cert.{}'.format(options['name'], cert_count)).exists(): - fp.child('{}.cert.{}'.format(options['name'], cert_count)).remove() - cert_count += 1 + if fp is not None: + while fp.child('{}.cert.{}'.format(options['name'], cert_count)).exists(): + fp.child('{}.cert.{}'.format(options['name'], cert_count)).remove() + cert_count += 1 _save_gridmanager_config(fp, gm) return 0