Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrate from imp to importlib #109

Open
wants to merge 3 commits into
base: 0.9.x
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions bases/main_menu.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ def enterCredits(self,params):
global plist_credits
VS.musicPlayList(plist_credits)

credits_title = """\t=== Vega Strike 0.9.0 ===
credits_title = """\t=== Vega Strike 0.10.0 ===
\t ---Credits---"""

credits_text_col1 = """
Expand Down Expand Up @@ -154,7 +154,7 @@ def enterCredits(self,params):
#CCCCff... and any we forgot to mention :)
"""

intro_title = """\t=== Vega Strike 0.9.0 ===
intro_title = """\t=== Vega Strike 0.10.0 ===
\t ---Intro Monologue---
"""

Expand Down
2 changes: 1 addition & 1 deletion documentation/readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ NOTICE: This readme file is very likely to be out of date.
For the latest manual, please check the Vega Strike Wiki:
http://vegastrike.sourceforge.net/wiki/Manual

=== VEGA STRIKE 0.9.0 - Upon the Coldest Sea ===
=== VEGA STRIKE 0.10.0 - Upon the Coldest Sea ===

README

Expand Down
4 changes: 2 additions & 2 deletions modules/custom.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import VS
import traceback
import sys
import imp
import importlib

procedures = {
}
Expand Down Expand Up @@ -124,7 +124,7 @@ def processMessage(local, cmd, argstr, id):
for arg in args:
print(arg)
if cmd=='reloadlib' and local and len(args)>=1:
imp.reload(__import__(args[0]))
importlib.reload(__import__(args[0]))
VS.IOmessage(0, "game", "p"+str(cp), "Reloaded "+str(args[0]))
elif cmd=='local':
# simple way of bouncing back message to client....
Expand Down
4 changes: 2 additions & 2 deletions modules/dj.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import dj_lib
import imp
imp.reload(dj_lib)
import importlib
importlib.reload(dj_lib)
dj_lib.PlayMusik()
4 changes: 2 additions & 2 deletions modules/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import unit
import sys
import traceback
import imp
import importlib
import custom

import server_lib
Expand Down Expand Up @@ -176,7 +176,7 @@ def processMessage(cp, localhost, command, arglist=None, id=''):
if authlevel<1:
return
mod=server_lib
imp.reload(mod)
importlib.reload(mod)
VS.IOmessage(0,"game","all","The server python script has been reloaded!")
print(mod.__name__+' has been reloaded!')
else:
Expand Down
4 changes: 2 additions & 2 deletions modules/server_lib.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
import faction_ships
import custom
import campaign_lib
import imp
import importlib

def serverDirector():
return server.getDirector()
Expand Down Expand Up @@ -142,7 +142,7 @@ def processMessage(player, auth, command, args, id=''):
if auth<1:
return
vsmod=VS
imp.reload(__import__('server_lib'))
importlib.reload(__import__('server_lib'))
vsmod.IOmessage(0,"game","all","The server python script has been reloaded.")
elif command=='userlist':
cstr = '#44cc44Users on the server:#888800'
Expand Down
2 changes: 1 addition & 1 deletion vsinstall.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ fi
SOURCE_PATH="$PWD"
cd "$SOURCE_PATH"

echo ' ==== VEGA STRIKE 0.9.0 ===='
echo ' ==== VEGA STRIKE 0.10.0 ===='
echo ''
echo ''
if [ "x" = "x$BINARY_APPEND" ]; then
Expand Down
Loading