Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Sun 20 May 2018, 21:26
All times are UTC - 4
 Forum index » House Training » HOWTO ( Solutions )
fix gpodder false network detection failure
Moderators: Flash, Ian, JohnMurga
Post new topic   Reply to topic View previous topic :: View next topic
Page 1 of 1 [1 Post]  
Author Message
TecnoGuy458

Joined: 26 Jan 2015
Posts: 124
Location: Ohio

PostPosted: Sat 06 Jan 2018, 22:34    Post subject:  fix gpodder false network detection failure
Subject description: a quick fix for gpodder claiming there is no network when updating podcasts.
 

I have to say i was rather annoyed when gpodder tried to tell me the network was down when i tried to update podcasts, when i was clearly browsing, streaming podcasts, and gpodder itself was adding podcasts just fine...

so failing a duck search, i did a little digging...

turns out the busybox ifconfig and ip are breaking gpodder's own network interface detection...


the fix itself is quite simple.

the problem lies in gpodder's util.py

(for me this was in /usr/share/pyshared/gpodder)

find the function "connection_available()" (it should start with "def connection_available()"


now: find the section of this function that looks like this:


Code:
...
# If we assume we're offline, try the "ip" command as fallback
            if offline and find_command('ip') is not None:
                if len(list(linux_get_active_interfaces())) == 0:
                    offline = True
                else:
                    offline = False
            return not offline
...



now the fix i came up with is to just put "offline = False" just before "return not offline" like so:


Code:
...
# If we assume we're offline, try the "ip" command as fallback
            if offline and find_command('ip') is not None:
                if len(list(linux_get_active_interfaces())) == 0:
                    offline = True
                else:
                    offline = False
            offline = False
            return not offline
...


This does effectivly disable the network detection in gpodder, but for me this works fine, and no network detection in gpodder is better than gpodder refusing to update my podcasts...

Hope this helps.
Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 1 of 1 [1 Post]  
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » House Training » HOWTO ( Solutions )
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0266s ][ Queries: 11 (0.0047s) ][ GZIP on ]