Page Menu
Home
DevCentral
Search
Configure Global Search
Log In
Files
F4060802
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
View Options
diff --git a/roles/paas-docker/wrappers/files/pad-delete.py b/roles/paas-docker/wrappers/files/pad-delete.py
index 480179a..4184f84 100644
--- a/roles/paas-docker/wrappers/files/pad-delete.py
+++ b/roles/paas-docker/wrappers/files/pad-delete.py
@@ -1,39 +1,38 @@
-#!/usr/bin/env python2
-# Note: Python 3 isn't installed by default on CentOS 7.
+#!/usr/bin/env python3
# -------------------------------------------------------------
# PaaS Docker
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# Project: Nasqueron
# Created: 2018-10-10
# License: Trivial work, not eligible to copyright
# Source file: roles/paas-docker/wrappers/files/pad-delete.py
# -------------------------------------------------------------
#
# <auto-generated>
# This file is managed by our rOPS SaltStack repository.
#
# Changes to this file may cause incorrect behavior
# and will be lost if the state is redeployed.
# </auto-generated>
-from six.moves.urllib.request import urlopen
+from urllib.request import urlopen
import json
import sys
API_KEY_FILE = "/srv/pad/APIKEY.txt"
PAD_HOST = "pad.nasqueron.org"
# Read API key
with open(API_KEY_FILE) as api_file:
key = api_file.read().strip()
# Fire request
url = "https://" + PAD_HOST + "/api/1/deletePad?apikey=" + key + "&padID=" + pad
contents = urlopen(url).read()
# Report result
result = json.loads(contents)
print(result["message"])
sys.exit(result["code"])
File Metadata
Details
Attached
Mime Type
text/x-diff
Expires
Tue, Jan 28, 07:54 (5 h, 36 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2380142
Default Alt Text
(1 KB)
Attached To
Mode
rOPS Nasqueron Operations
Attached
Detach File
Event Timeline
Log In to Comment