Skip to content

Commit 9f59257

Browse files
Remove stella checks from pony to allow use without moira access
1 parent 2fa147d commit 9f59257

File tree

2 files changed

+2
-22
lines changed

2 files changed

+2
-22
lines changed

scriptspony/controllers/root.py

+2-6
Original file line numberDiff line numberDiff line change
@@ -300,12 +300,8 @@ def approve(self, id, subject=None, body=None, token=None, silent=False, **kwarg
300300
redirect("/queue")
301301
short = t.hostname[: -len(".mit.edu")]
302302
assert t.hostname[0] != "-"
303-
stella = subprocess.Popen(
304-
["/usr/bin/stella", t.hostname],
305-
stdout=subprocess.PIPE,
306-
stderr=subprocess.PIPE,
307-
)
308-
out, err = stella.communicate()
303+
out = "You need to check this yourself!"
304+
err = "Pony can't check this anymore!"
309305
return dict(
310306
tickets=[t],
311307
action=url("/approve/%s" % id),

scriptspony/vhosts.py

-16
Original file line numberDiff line numberDiff line change
@@ -382,22 +382,6 @@ def validate_hostname(hostname, locker):
382382
"'%s' already exists. Please choose another name or contact [email protected] if you wish to transfer the hostname to scripts."
383383
% hostname
384384
)
385-
stella_cmd = subprocess.Popen(
386-
["/usr/bin/stella", "-u", "-noauth", hostname],
387-
stdout=subprocess.PIPE,
388-
stderr=subprocess.PIPE,
389-
)
390-
out, err = stella_cmd.communicate()
391-
if stella_cmd.returncode != 1:
392-
# Then its reserved, deleted, etc.
393-
status = "Unknown"
394-
for line in out.split("\n"):
395-
if "Status:" in line:
396-
status = line.split(" ")[-2]
397-
raise UserError(
398-
"'%s' is not available; it currently has status %s. Please choose another name or contact [email protected] if you wish to transfer the hostname to scripts."
399-
% (hostname, status)
400-
)
401385

402386
else:
403387
reqtype = "external"

0 commit comments

Comments
 (0)