mirror of
https://github.com/GNS3/gns3-server.git
synced 2026-11-03 05:51:15 +02:00
style: remove unused imports and variables in project.py
Remove unused import and exception variable flagged by ruff: - Remove unused 'sys' import (F401) - Remove unused exception variable 'e' in except clause (F841) Co-Authored-By: Yue Guobin <yueguobin@outlook.com>
This commit is contained in:
1 parent
c0aec3f979
commit
7d031a6802
1 file changed
+1
-2
@@ -15,7 +15,6 @@
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
import sys
|
||||
import re
|
||||
import os
|
||||
import json
|
||||
@@ -526,7 +525,7 @@ class Project:
|
||||
name = base_name.format(number, id=number, name="Node")
|
||||
except KeyError as e:
|
||||
raise ControllerError("{" + e.args[0] + "} is not a valid replacement string in the node name")
|
||||
except (ValueError, IndexError) as e:
|
||||
except (ValueError, IndexError):
|
||||
raise ControllerError(f"{base_name} is not a valid replacement string in the node name")
|
||||
if name not in self._allocated_node_names:
|
||||
self._allocated_node_names.add(name)
|
||||
|
||||
Reference in new issue
Block a user