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

After download crossepg reverts to flash #8

Closed
IAmATeaf opened this issue Feb 27, 2012 · 3 comments
Closed

After download crossepg reverts to flash #8

IAmATeaf opened this issue Feb 27, 2012 · 3 comments

Comments

@IAmATeaf
Copy link
Contributor

Am using a dm 800se, with OpenPLi and crossepg svn 300. I have a USB flash drive and an internal HDD, mounted as /media/usb and /media/hdd. I've configured crossepg to use Flash memory stick but after an overnight download the config gets set back to internal flash.

I've checked the download and all the download process completed without any errors and used the path /media/usb/crossepg (USB flash memory stick) but it seems that after the download had s completed crossepg config is set to use internal flash. I've also check the log file which shows that the download completed onto the USB flash memory stick.

I can't then set to use the USB flash memory stick or HDD, they are not presented as options when pressing the left/right arrow buttons on the remote until after I've restarted enigma2.

So what checking does crossepg perform after the download which would cause it to think that the USB and HDD are not present.

@IAmATeaf
Copy link
Contributor Author

I've investigated this and it seems that 'touch' command is failing when the Configure screen checks to see of the mounted partitions are read/write. I posted on the OpenPLi forums and it seems that the calling of a shell command is known to randomly fail, they think that error will be along the line of Out of Memory. They've suggested that rather than making a shell command to use python calls so I've changed the code in crossepg_setup.py from:

def isMountedInRW(self, path):
    testfile = path + "/tmp-rw-test"
    os.system("touch " + testfile)
    if os.path.exists(testfile):
        os.system("rm -f " + testfile)
        return True
    return False

to

def isMountedInRW(self, path):
    testfile = path + "/tmp-rw-test"
    open(testfile, "wb").close()
    if os.path.exists(testfile):
        os.remove(testfile)
        return True
    return False

and am testing it to see if the problem is still there

@IAmATeaf
Copy link
Contributor Author

With the help of the OpenPLi forums I've revised the above code to as it was pointed out the if the partition was really read-only then the Configure screen would green screen:

def isMountedInRW(self, path):
    testfile = os.path.join(path, "tmp-rw-test")
    try:
        open(testfile, "wb").close()
        os.unlink(testfile)
    except:
        return False
    return True

skaman pushed a commit that referenced this issue Apr 21, 2012
isMountedInRW api seem to fail
IAmATeaf rewrote it in a more elegant and reliable way
@skaman
Copy link
Member

skaman commented Apr 21, 2012

Applied it. Thanks.

@skaman skaman closed this as completed Apr 21, 2012
tension9000 pushed a commit to tension9000/e2openplugin-CrossEPG that referenced this issue Jan 23, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants