Skip to content

Commit

Permalink
Merge pull request #3393 from devos50/hide_console
Browse files Browse the repository at this point in the history
Hiding console on Windows and macOS
  • Loading branch information
devos50 authored Jan 25, 2018
2 parents ca9afda + 1f186eb commit 7eca1e0
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 5 deletions.
6 changes: 5 additions & 1 deletion Tribler/Core/Modules/channel/channel_rss.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
from Tribler.Core.Utilities.utilities import http_get

from twisted.internet import reactor
from twisted.internet.defer import DeferredList
from twisted.internet.defer import DeferredList, succeed
from twisted.web.client import getPage

from Tribler.dispersy.taskmanager import TaskManager
Expand Down Expand Up @@ -87,6 +87,10 @@ def parse_feed(self):
rss_parser = RSSFeedParser()

def on_rss_items(rss_items):
if not rss_items:
self._logger.warning(u"No RSS items found.")
return succeed(None)

def_list = []
for rss_item in rss_items:
if self._to_stop:
Expand Down
13 changes: 12 additions & 1 deletion Tribler/Test/Core/Modules/Channel/test_channel_rss.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,13 +73,24 @@ def test_parse_rss_feed(self):
Test parsing a rss feed
"""
self.channel_rss.rss_url = 'http://localhost:%d/test_rss.xml' % self.file_server_port
self.channel_rss._url_cache = SimpleCache(os.path.join(self.session_base_dir, 'cache.txt'))

def verify_rss(items):
self.assertEqual(len(items), 2)

return self.channel_rss.parse_feed().addCallback(verify_rss)

@deferred(timeout=10)
def test_parse_no_rss(self):
"""
Test parsing a non-rss feed
"""
self.channel_rss.rss_url = 'http://localhost:%d/test_rsszz.xml' % self.file_server_port

def verify_rss(items):
self.assertIsNone(items)

return self.channel_rss.parse_feed().addCallback(verify_rss)

@deferred(timeout=10)
def test_parse_feed_stopped(self):
"""
Expand Down
2 changes: 1 addition & 1 deletion Tribler/community/tunnel/routing.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ def tunnel_data(self, destination, payload):
@param str payload: the packet's payload
"""

self._logger.info("Tunnel data (len %d) to end for circuit %s with ultimate destination %s", len(payload),
self._logger.debug("Tunnel data (len %d) to end for circuit %s with ultimate destination %s", len(payload),
self.circuit_id, destination)

num_bytes = self.proxy.send_data([Candidate(self.first_hop, False)], self.circuit_id, destination, ('0.0.0.0', 0), payload)
Expand Down
4 changes: 2 additions & 2 deletions tribler.spec
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ exe = EXE(pyz,
debug=False,
strip=False,
upx=True,
console=True,
console=False,
icon='Tribler/Main/Build/Win/tribler.ico')
coll = COLLECT(exe,
a.binaries,
Expand All @@ -72,7 +72,7 @@ app = BUNDLE(coll,
icon='Tribler/Main/Build/Mac/tribler.icns',
bundle_identifier='nl.tudelft.tribler',
info_plist={'NSHighResolutionCapable': 'True', 'CFBundleInfoDictionaryVersion': 1.0, 'CFBundleVersion': version_str, 'CFBundleShortVersionString': version_str},
console=True)
console=False)

# Remove libvlc - conflicts on Windows
if sys.platform == 'win32':
Expand Down

0 comments on commit 7eca1e0

Please sign in to comment.